﻿<%@ Page Title="" Language="C#" MasterPageFile="~/GUI/SystemAdmin.Master" AutoEventWireup="true" CodeBehind="ManageAccountPage.aspx.cs" Inherits="Smart_Transportation.GUI.Manage_Account.ManageAccount" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .style1
    {
        width: 100%;
        color: #000000;
    }
    .style2
    {
        width: 90px;
    }
    .style3
    {
        width: 90px;
        text-align: right;
    }
    .style4
    {
        width: 55px;
        text-align: right;
    }
    .style5
    {
        width: 119px;
    }
    .style6
    {
        width: 140px;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table class="style1">
    <tr>
        <td class="style2">
            &nbsp;</td>
        <td class="style5">
            <asp:Button ID="btListallAccount" runat="server" 
                onclick="btListallAccount_Click" Text="List all Account" />
        </td>
        <td class="style4">
            &nbsp;</td>
        <td class="style6">
            <asp:Button ID="btAddUser" runat="server" onclick="btAddUser_Click" 
                Text="Add new Account" />
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style2">
            &nbsp;</td>
        <td class="style5">
            &nbsp;</td>
        <td class="style4">
            &nbsp;</td>
        <td class="style6">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style3">
            Account name:</td>
        <td class="style5">
            <asp:TextBox ID="tbUserName" runat="server"></asp:TextBox>
        </td>
        <td class="style4">
            Region:</td>
        <td class="style6">
            <asp:DropDownList ID="ddlRegionOfUser" runat="server">
            </asp:DropDownList>
        </td>
        <td>
            <asp:Button ID="btSearchUser" runat="server" Text="Search" Width="96px" />
        </td>
    </tr>
    </table>
<br />
<asp:GridView ID="gvListAllAccount" runat="server" AutoGenerateColumns="False" 
    DataSourceID="SmartTransportation">
    <Columns>
        <asp:HyperLinkField DataNavigateUrlFields="UserName" 
            DataNavigateUrlFormatString="EditUserPage.aspx?pname={0}" 
            DataTextField="UserName" HeaderText="User Name" />
        <asp:BoundField DataField="Password" HeaderText="Password" 
            SortExpression="Password" />
        <asp:BoundField DataField="Fullname" HeaderText="Full Name" 
            SortExpression="Fullname" />
        <asp:BoundField DataField="Region" HeaderText="Region" 
            SortExpression="Region" />
        <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
        <asp:BoundField DataField="Type" HeaderText="Type of account" 
            SortExpression="Type" />
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SmartTransportation" runat="server" 
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    SelectCommand="SELECT * FROM [tblAccount]"></asp:SqlDataSource>
</asp:Content>
